%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for queries/v4/enum_tables.queries"
    Bucket0("Bucket 0 (root)<br /><br />1: <br />ᐳ: 6, 9, 10, 103, 104, 11, 35, 41, 43, 48<br />2: 8, 15, 20, 25, 30, 38, 45<br />3: 12, 17, 22, 28, 33, 40, 47<br />ᐳ: 27, 29, 32, 34<br />4: 50, 53, 56, 61, 64"):::bucket
    Bucket1("Bucket 1 (nullableBoundary)<br />Deps: 12, 50<br /><br />ROOT Connectionᐸ8ᐳ[12]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 17, 53<br /><br />ROOT Connectionᐸ15ᐳ[17]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 22, 56<br /><br />ROOT Connectionᐸ20ᐳ[22]"):::bucket
    Bucket4("Bucket 4 (nullableBoundary)<br />Deps: 29<br /><br />ROOT PgSelectSingleᐸletter_descriptionsᐳ[29]"):::bucket
    Bucket5("Bucket 5 (nullableBoundary)<br />Deps: 34<br /><br />ROOT PgSelectSingleᐸletter_descriptionsᐳ[34]"):::bucket
    Bucket6("Bucket 6 (nullableBoundary)<br />Deps: 40, 61<br /><br />ROOT Connectionᐸ38ᐳ[40]"):::bucket
    Bucket7("Bucket 7 (nullableBoundary)<br />Deps: 47, 64<br /><br />ROOT Connectionᐸ45ᐳ[47]"):::bucket
    Bucket13("Bucket 13 (listItem)<br /><br />ROOT __Item{13}ᐸ50ᐳ[73]"):::bucket
    Bucket14("Bucket 14 (listItem)<br /><br />ROOT __Item{14}ᐸ53ᐳ[75]"):::bucket
    Bucket15("Bucket 15 (listItem)<br /><br />ROOT __Item{15}ᐸ56ᐳ[77]"):::bucket
    Bucket16("Bucket 16 (listItem)<br /><br />ROOT __Item{16}ᐸ61ᐳ[79]"):::bucket
    Bucket17("Bucket 17 (listItem)<br /><br />ROOT __Item{17}ᐸ64ᐳ[81]"):::bucket
    Bucket18("Bucket 18 (nullableBoundary)<br />Deps: 74<br /><br />ROOT PgSelectSingle{13}ᐸletter_descriptionsᐳ[74]"):::bucket
    Bucket19("Bucket 19 (nullableBoundary)<br />Deps: 76<br /><br />ROOT PgSelectSingle{14}ᐸletter_descriptionsᐳ[76]"):::bucket
    Bucket20("Bucket 20 (nullableBoundary)<br />Deps: 78<br /><br />ROOT PgSelectSingle{15}ᐸletter_descriptionsᐳ[78]"):::bucket
    Bucket21("Bucket 21 (nullableBoundary)<br />Deps: 80<br /><br />ROOT PgSelectSingle{16}ᐸletter_descriptionsᐳ[80]"):::bucket
    Bucket22("Bucket 22 (nullableBoundary)<br />Deps: 82<br /><br />ROOT PgSelectSingle{17}ᐸletter_descriptionsᐳ[82]"):::bucket
    end
    Bucket0 --> Bucket1 & Bucket2 & Bucket3 & Bucket4 & Bucket5 & Bucket6 & Bucket7
    Bucket1 --> Bucket13
    Bucket2 --> Bucket14
    Bucket3 --> Bucket15
    Bucket6 --> Bucket16
    Bucket7 --> Bucket17
    Bucket13 --> Bucket18
    Bucket14 --> Bucket19
    Bucket15 --> Bucket20
    Bucket16 --> Bucket21
    Bucket17 --> Bucket22

    %% plan dependencies
    Object11{{"Object[11∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access9{{"Access[9∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access10{{"Access[10∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access9 & Access10 --> Object11
    PgSelect25[["PgSelect[25∈0] ➊<br />ᐸletter_descriptionsᐳ<br />More deps:<br />- Constantᐸ'B'ᐳ[103]"]]:::plan
    Object11 --> PgSelect25
    PgSelect30[["PgSelect[30∈0] ➊<br />ᐸletter_descriptionsᐳ<br />More deps:<br />- Constantᐸ'B'ᐳ[103]"]]:::plan
    Object11 --> PgSelect30
    __InputObject35{{"__InputObject[35∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[6]<br />- Constantᐸ'C'ᐳ[104]"}}:::plan
    PgSelect38[["PgSelect[38∈0] ➊<br />ᐸletter_descriptionsᐳ"]]:::plan
    ApplyInput41{{"ApplyInput[41∈0] ➊"}}:::plan
    Object11 & ApplyInput41 --> PgSelect38
    __InputObject43{{"__InputObject[43∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[6]<br />- Constantᐸ'C'ᐳ[104]"}}:::plan
    PgSelect45[["PgSelect[45∈0] ➊<br />ᐸletter_descriptionsᐳ"]]:::plan
    ApplyInput48{{"ApplyInput[48∈0] ➊"}}:::plan
    Object11 & ApplyInput48 --> PgSelect45
    PgSelect8[["PgSelect[8∈0] ➊<br />ᐸletter_descriptionsᐳ"]]:::plan
    Object11 --> PgSelect8
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access9
    __Value2 --> Access10
    Connection12[["Connection[12∈0] ➊<br />ᐸ8ᐳ"]]:::plan
    PgSelect8 --> Connection12
    PgSelect15[["PgSelect[15∈0] ➊<br />ᐸletter_descriptionsᐳ"]]:::plan
    Object11 --> PgSelect15
    Connection17[["Connection[17∈0] ➊<br />ᐸ15ᐳ"]]:::plan
    PgSelect15 --> Connection17
    PgSelect20[["PgSelect[20∈0] ➊<br />ᐸletter_descriptionsᐳ"]]:::plan
    Object11 --> PgSelect20
    Connection22[["Connection[22∈0] ➊<br />ᐸ20ᐳ"]]:::plan
    PgSelect20 --> Connection22
    First27{{"First[27∈0] ➊"}}:::plan
    PgSelectRows28[["PgSelectRows[28∈0] ➊"]]:::plan
    PgSelectRows28 --> First27
    PgSelect25 --> PgSelectRows28
    PgSelectSingle29{{"PgSelectSingle[29∈0] ➊<br />ᐸletter_descriptionsᐳ"}}:::plan
    First27 --> PgSelectSingle29
    First32{{"First[32∈0] ➊"}}:::plan
    PgSelectRows33[["PgSelectRows[33∈0] ➊"]]:::plan
    PgSelectRows33 --> First32
    PgSelect30 --> PgSelectRows33
    PgSelectSingle34{{"PgSelectSingle[34∈0] ➊<br />ᐸletter_descriptionsᐳ"}}:::plan
    First32 --> PgSelectSingle34
    Connection40[["Connection[40∈0] ➊<br />ᐸ38ᐳ"]]:::plan
    PgSelect38 --> Connection40
    __InputObject35 --> ApplyInput41
    Connection47[["Connection[47∈0] ➊<br />ᐸ45ᐳ"]]:::plan
    PgSelect45 --> Connection47
    __InputObject43 --> ApplyInput48
    ConnectionItems50[["ConnectionItems[50∈0] ➊"]]:::plan
    Connection12 --> ConnectionItems50
    ConnectionItems53[["ConnectionItems[53∈0] ➊"]]:::plan
    Connection17 --> ConnectionItems53
    ConnectionItems56[["ConnectionItems[56∈0] ➊"]]:::plan
    Connection22 --> ConnectionItems56
    ConnectionItems61[["ConnectionItems[61∈0] ➊"]]:::plan
    Connection40 --> ConnectionItems61
    ConnectionItems64[["ConnectionItems[64∈0] ➊"]]:::plan
    Connection47 --> ConnectionItems64
    PgClassExpression59{{"PgClassExpression[59∈4] ➊<br />ᐸ__letter_d...ons__.”id”ᐳ"}}:::plan
    PgSelectSingle29 --> PgClassExpression59
    PgClassExpression67{{"PgClassExpression[67∈4] ➊<br />ᐸ__letter_d..._.”letter”ᐳ"}}:::plan
    PgClassExpression59 o--o PgClassExpression67
    PgClassExpression69{{"PgClassExpression[69∈4] ➊<br />ᐸ__letter_d..._via_view”ᐳ"}}:::plan
    PgClassExpression67 o--o PgClassExpression69
    PgClassExpression71{{"PgClassExpression[71∈4] ➊<br />ᐸ__letter_d...scription”ᐳ"}}:::plan
    PgClassExpression69 o--o PgClassExpression71
    PgClassExpression60{{"PgClassExpression[60∈5] ➊<br />ᐸ__letter_d...ons__.”id”ᐳ"}}:::plan
    PgSelectSingle34 --> PgClassExpression60
    PgClassExpression68{{"PgClassExpression[68∈5] ➊<br />ᐸ__letter_d..._.”letter”ᐳ"}}:::plan
    PgClassExpression60 o--o PgClassExpression68
    PgClassExpression70{{"PgClassExpression[70∈5] ➊<br />ᐸ__letter_d..._via_view”ᐳ"}}:::plan
    PgClassExpression68 o--o PgClassExpression70
    PgClassExpression72{{"PgClassExpression[72∈5] ➊<br />ᐸ__letter_d...scription”ᐳ"}}:::plan
    PgClassExpression70 o--o PgClassExpression72
    __Item73[/"__Item[73∈13]<br />ᐸ50ᐳ"\]:::itemplan
    ConnectionItems50 ==> __Item73
    PgSelectSingle74{{"PgSelectSingle[74∈13]<br />ᐸletter_descriptionsᐳ"}}:::plan
    __Item73 --> PgSelectSingle74
    __Item75[/"__Item[75∈14]<br />ᐸ53ᐳ"\]:::itemplan
    ConnectionItems53 ==> __Item75
    PgSelectSingle76{{"PgSelectSingle[76∈14]<br />ᐸletter_descriptionsᐳ"}}:::plan
    __Item75 --> PgSelectSingle76
    __Item77[/"__Item[77∈15]<br />ᐸ56ᐳ"\]:::itemplan
    ConnectionItems56 ==> __Item77
    PgSelectSingle78{{"PgSelectSingle[78∈15]<br />ᐸletter_descriptionsᐳ"}}:::plan
    __Item77 --> PgSelectSingle78
    __Item79[/"__Item[79∈16]<br />ᐸ61ᐳ"\]:::itemplan
    ConnectionItems61 ==> __Item79
    PgSelectSingle80{{"PgSelectSingle[80∈16]<br />ᐸletter_descriptionsᐳ"}}:::plan
    __Item79 --> PgSelectSingle80
    __Item81[/"__Item[81∈17]<br />ᐸ64ᐳ"\]:::itemplan
    ConnectionItems64 ==> __Item81
    PgSelectSingle82{{"PgSelectSingle[82∈17]<br />ᐸletter_descriptionsᐳ"}}:::plan
    __Item81 --> PgSelectSingle82
    PgClassExpression83{{"PgClassExpression[83∈18]<br />ᐸ__letter_d...ons__.”id”ᐳ"}}:::plan
    PgSelectSingle74 --> PgClassExpression83
    PgClassExpression88{{"PgClassExpression[88∈18]<br />ᐸ__letter_d..._.”letter”ᐳ"}}:::plan
    PgClassExpression83 o--o PgClassExpression88
    PgClassExpression93{{"PgClassExpression[93∈18]<br />ᐸ__letter_d..._via_view”ᐳ"}}:::plan
    PgClassExpression88 o--o PgClassExpression93
    PgClassExpression98{{"PgClassExpression[98∈18]<br />ᐸ__letter_d...scription”ᐳ"}}:::plan
    PgClassExpression93 o--o PgClassExpression98
    PgClassExpression84{{"PgClassExpression[84∈19]<br />ᐸ__letter_d...ons__.”id”ᐳ"}}:::plan
    PgSelectSingle76 --> PgClassExpression84
    PgClassExpression89{{"PgClassExpression[89∈19]<br />ᐸ__letter_d..._.”letter”ᐳ"}}:::plan
    PgClassExpression84 o--o PgClassExpression89
    PgClassExpression94{{"PgClassExpression[94∈19]<br />ᐸ__letter_d..._via_view”ᐳ"}}:::plan
    PgClassExpression89 o--o PgClassExpression94
    PgClassExpression99{{"PgClassExpression[99∈19]<br />ᐸ__letter_d...scription”ᐳ"}}:::plan
    PgClassExpression94 o--o PgClassExpression99
    PgClassExpression85{{"PgClassExpression[85∈20]<br />ᐸ__letter_d...ons__.”id”ᐳ"}}:::plan
    PgSelectSingle78 --> PgClassExpression85
    PgClassExpression90{{"PgClassExpression[90∈20]<br />ᐸ__letter_d..._.”letter”ᐳ"}}:::plan
    PgClassExpression85 o--o PgClassExpression90
    PgClassExpression95{{"PgClassExpression[95∈20]<br />ᐸ__letter_d..._via_view”ᐳ"}}:::plan
    PgClassExpression90 o--o PgClassExpression95
    PgClassExpression100{{"PgClassExpression[100∈20]<br />ᐸ__letter_d...scription”ᐳ"}}:::plan
    PgClassExpression95 o--o PgClassExpression100
    PgClassExpression86{{"PgClassExpression[86∈21]<br />ᐸ__letter_d...ons__.”id”ᐳ"}}:::plan
    PgSelectSingle80 --> PgClassExpression86
    PgClassExpression91{{"PgClassExpression[91∈21]<br />ᐸ__letter_d..._.”letter”ᐳ"}}:::plan
    PgClassExpression86 o--o PgClassExpression91
    PgClassExpression96{{"PgClassExpression[96∈21]<br />ᐸ__letter_d..._via_view”ᐳ"}}:::plan
    PgClassExpression91 o--o PgClassExpression96
    PgClassExpression101{{"PgClassExpression[101∈21]<br />ᐸ__letter_d...scription”ᐳ"}}:::plan
    PgClassExpression96 o--o PgClassExpression101
    PgClassExpression87{{"PgClassExpression[87∈22]<br />ᐸ__letter_d...ons__.”id”ᐳ"}}:::plan
    PgSelectSingle82 --> PgClassExpression87
    PgClassExpression92{{"PgClassExpression[92∈22]<br />ᐸ__letter_d..._.”letter”ᐳ"}}:::plan
    PgClassExpression87 o--o PgClassExpression92
    PgClassExpression97{{"PgClassExpression[97∈22]<br />ᐸ__letter_d..._via_view”ᐳ"}}:::plan
    PgClassExpression92 o--o PgClassExpression97
    PgClassExpression102{{"PgClassExpression[102∈22]<br />ᐸ__letter_d...scription”ᐳ"}}:::plan
    PgClassExpression97 o--o PgClassExpression102

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,PgSelect8,Access9,Access10,Object11,Connection12,PgSelect15,Connection17,PgSelect20,Connection22,PgSelect25,First27,PgSelectRows28,PgSelectSingle29,PgSelect30,First32,PgSelectRows33,PgSelectSingle34,__InputObject35,PgSelect38,Connection40,ApplyInput41,__InputObject43,PgSelect45,Connection47,ApplyInput48,ConnectionItems50,ConnectionItems53,ConnectionItems56,ConnectionItems61,ConnectionItems64 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3 bucket3
    classDef bucket4 stroke:#0000ff
    class Bucket4,PgClassExpression59,PgClassExpression67,PgClassExpression69,PgClassExpression71 bucket4
    classDef bucket5 stroke:#7fff00
    class Bucket5,PgClassExpression60,PgClassExpression68,PgClassExpression70,PgClassExpression72 bucket5
    classDef bucket6 stroke:#ff1493
    class Bucket6 bucket6
    classDef bucket7 stroke:#808000
    class Bucket7 bucket7
    classDef bucket13 stroke:#3cb371
    class Bucket13,__Item73,PgSelectSingle74 bucket13
    classDef bucket14 stroke:#a52a2a
    class Bucket14,__Item75,PgSelectSingle76 bucket14
    classDef bucket15 stroke:#ff00ff
    class Bucket15,__Item77,PgSelectSingle78 bucket15
    classDef bucket16 stroke:#f5deb3
    class Bucket16,__Item79,PgSelectSingle80 bucket16
    classDef bucket17 stroke:#696969
    class Bucket17,__Item81,PgSelectSingle82 bucket17
    classDef bucket18 stroke:#00bfff
    class Bucket18,PgClassExpression83,PgClassExpression88,PgClassExpression93,PgClassExpression98 bucket18
    classDef bucket19 stroke:#7f007f
    class Bucket19,PgClassExpression84,PgClassExpression89,PgClassExpression94,PgClassExpression99 bucket19
    classDef bucket20 stroke:#ffa500
    class Bucket20,PgClassExpression85,PgClassExpression90,PgClassExpression95,PgClassExpression100 bucket20
    classDef bucket21 stroke:#0000ff
    class Bucket21,PgClassExpression86,PgClassExpression91,PgClassExpression96,PgClassExpression101 bucket21
    classDef bucket22 stroke:#7fff00
    class Bucket22,PgClassExpression87,PgClassExpression92,PgClassExpression97,PgClassExpression102 bucket22

